//
//  AVaudioplayerManager.h
//  蓝牙
//
//  Created by 赵鹏宇 on 16/2/23.
//  Copyright © 2016年 赵鹏宇. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import "Song.h"

typedef void(^ErrorBlock)(NSError *error);

@interface AVaudioplayerManager : NSObject

@property (nonatomic,strong) AVAudioPlayer *player;
@property (nonatomic , strong) NSURL * url;
@property (nonatomic , strong) Song * playingSong;

+ (instancetype)standardManager;
- (void)setupWithSong:(Song *)song delegate:(id<AVAudioPlayerDelegate>)delegate Block:(ErrorBlock)AVAudioPlayerCreateErrorBlock;
- (void)playMusic;
- (void)pausePlay;
- (void)stopPlay;

@end
